import Vue from 'vue'
import App from './App.vue'
import router from "@/router"
import store from './store';
import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import "@/mock/index"
import "swiper/css/swiper.css"

Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.config.productionTip = false

//网络请求接口统一引入
import * as API from "@/API/index"      //统一引入到API这个里面去


//注册全局组件
import TypeNov from "@/components/TypeNov"      //商品分类的三级列表
import Carousel from "@/components/Carousel"    //轮播图
import Paging from "@/components/Paging"        //分页器
Vue.component(Paging.name, Paging)
Vue.component(Carousel.name, Carousel)
Vue.component(TypeNov.name, TypeNov)



new Vue({
  store,
  router,
  beforeCreate() {
    Vue.prototype.$API = API      //之后保存在全局中的原型对象上
    Vue.prototype.$Eve = this
  },
  render: h => h(App),
}).$mount('#app')
